;; =============================================================================
;; defines core oali package structure
;; NOTE:
;;  - in order to overcome sbcl warning about package oali.core uses asdf use
;;    qualified defsystem name (luckily this is the only place where this prefix shall be used)
;;  - use the following to establish and check case sensitiveness
;;    (progn (setf (readtable-case *readtable*) :invert) (assert (string= (format nil "~a~a~a~a" 'foo 'Foo 'FOO 'FoOOo) "fooFooFOOFoOOo")))
;;  - in order to preserve case sensitiveness for sbcl create the following
;;    file ~/.sbcl (or ~/.clisprc for clisp) and put the following to it:
;;    (setf (readtable-case *readtable*) :invert)
;;


(defpackage :oali.core (:use :cl))
(in-package :oali.core)

(asdf:defsystem oali.core
  :name "oali.core"
  :components
  ((:file "packages")
   
   ;; AST nodes or statements and related generics
   (:module "ast"
            :depends-on ("packages")
            :components ((:file "statements")
                         (:file "print-c"
                                :depends-on ("statements"))
                         (:file "visit-childs"
                                :depends-on ("statements"))))
   ;; Parser part
   (:module "parser"
            :depends-on ("ast")
            :components ((:file "context")
			 (:file "errors")
                         (:file "parser-utility"
                                :depends-on ("context" "errors"))
                         (:file "parse-test-decl"
                                :depends-on ("parser-utility"))
                         (:file "parse-type-decl"
                                :depends-on ("parser-utility"))
                         (:file "parse-constraint-decl"
                                :depends-on ("parser-utility"))
			 (:file "parse-func-decl"
                                :depends-on ("parser-utility"))
			 (:file "parse-roles-decl"
                                :depends-on ("parser-utility"))
                         (:file "parse-toplev"
                                :depends-on ("parse-test-decl"
					     "parse-type-decl"
					     "parse-func-decl"
					     "parse-roles-decl"
					     "parse-constraint-decl"))
                         (:file "parser"
                                :depends-on ("parse-toplev"))))

   ;; Test part (to be excluded later)
   (:module "tests"
	    :depends-on ("parser")
	    :components ((:file "run-tests")
			 (:file "new-features")))))

